package io.example.demo

import java.util.logging.Level

import com.google.common.collect.ImmutableList
import org.apache.spark.sql.SparkSession
class Foo(val s:String) {
  override def equals(obj: Any): Boolean = {
    obj.asInstanceOf[Foo].s.equals(s)
  }
}
object Demo {
  def main(args: Array[String]): Unit = {
    val s=System.getenv("HADOOP_HOME")
    val spark = SparkSession
      .builder()
      .master("local[2]")
      .appName("Spark  basic example")
      .getOrCreate()
    val ctx = spark.sparkContext
    val acc = ctx.broadcast(Map( "a"->1))
    ctx.parallelize(Array(1))
      .mapPartitions(x=>{
        x
      })
  }

  def foo(x:((Int,Int))=>Int): Unit = {

  }
}
